<?php
$a=$_GET["a"];
$b=$_GET["b"];
$cc=$_GET["cc"];
switch ($cc){
    case '+':$result=$a+$b;break;
    case '-':$result=$a+$b;break;
    case '*':$result=$a+$b;break;
    case '/':$result=$a+$b;break;
}
?>
<form action="text3.php" method="get">
<input type="text" name="a" value="<?php echo $a ?>">
<select name="cc">
    <option value="+" <?php echo $cc=='+'?'selected':''?>>+</option>
    <option value="-" <?php echo $cc=='-'?'selected':''?>>-</option>
    <option value="*" <?php echo $cc=='*'?'selected':''?>>*</option>
    <option value="/" <?php echo $cc=='/'?'selected':''?>>/</option>
</select>
<input type="text" name="b" value="<?php echo $b ?>">=
<input type="text" name="c"><button type="submit">计算</button>
</form>
